home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / rexx / smacrosflow.lha / SuperMacrosDOCS.FinalWriter (.txt) < prev    next >
Final Write Document  |  1995-01-17  |  225KB  |  547 lines

  1.  
  2.  
  3.  
  4. SuperMacros
  5.  
  6.  
  7.  
  8.  
  9. Final Writer
  10. ®
  11.  ARexx
  12. ®
  13.  Automation
  14.  
  15.  
  16. by
  17. S. R. Giovenella
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61. ©Copyright 1994 S.R.Giovenella, All rights reserved
  62. ®Final Writer is a registered trademark of SoftWood, Inc.
  63. ®ARexx is a registered trademark of Commode-Amiga, Inc.
  64.  
  65. Auto_Save
  66. Originally written for Final Copy users, but better that the Final Writer auto 
  67. save feature, because it can be totally transparent.  Its also has more 
  68. flexible timing options.  Caution:  if you don't use the "Confirmation" option, 
  69. there is no way to terminate the routine, except for ending the program and 
  70. restarting it.
  71.  
  72. Quick_Envelope
  73. Entering Data
  74. To begin, simply type the address on the screen, in the font and size you would 
  75. like, and highlight it with the mouse.  Then run the SuperMacro by selecting 
  76. the "Other >> ARexx Script" option from the "User" menu.  Then go to the 
  77. directory that contains the SuperMacros and double-click on 
  78. Quick_Envelope
  79. .  Better yet, add the script to a the "User Menu" or the "Button Strip".  If 
  80. no text is highlighted, the SuperMacro will ask you for some.  Be sure the font 
  81. and size you want is already selected.
  82.  
  83. You will then be asked to enter a name for the template envelope.  This is the 
  84. document that the address will be printed upon.  A sample template named 
  85. "Template_BusinessEnvelope" has been supplied, and should be placed in your 
  86. FWDocs drawer, so the SuperMacro can find it.  The address will be inserted 
  87. after of the text on the "template", so be sure the last line is at the proper 
  88. position, and the margins are set correctly for the address.  As long as this 
  89. "template" envelope prints correctly, so will the final product.  Note: if this 
  90. document is in a drawer with a different name, you will need to edit the macro 
  91. itself to reflect the correct document drawer's name.  Always work with a copy 
  92. of your original software, as macros are easy to screw up.
  93.  
  94. Manipulating Data
  95. Once the envelope is created and addressed, the words can be manipulated as 
  96. normal text (just cancel the print requestor first).   
  97.  
  98.  
  99.  
  100. Create Bar Graph
  101. Entering Data
  102. Before you run this 
  103. SuperMacro
  104. , you must enter the data to be graphed.
  105.  
  106. Entering the data to be graphed is a very simple process.  The 
  107. SuperMacro
  108.  will look for each element of the graph in a certain line position.  Just 
  109. enter each line of data in the proper order, then hit return.
  110.  
  111. ·
  112.     
  113. The first line must be the 
  114. T
  115. i
  116. tle
  117.  of the graph.
  118. ·
  119.     
  120. The second line must be the 
  121. S
  122. u
  123. btitle
  124. .
  125. ·
  126.     
  127. The third line must contain the 
  128. X
  129. -axis Title
  130.  
  131. <tab>
  132.  
  133. Y
  134. -axis Title
  135. .
  136. ·
  137.     
  138. All remaining lines must contain 
  139. X
  140. -axis Data
  141.  
  142. <tab>
  143.  
  144. Y
  145. -axi
  146. s Data
  147. .
  148.  
  149. The following example shows how the data entered on the left, will be used to 
  150. automatically create the bar graph shown on the right.  Note the use of the 
  151. <tab> key from the third line and onward.
  152.  
  153. Example:
  154.  
  155. Our Top Sellers!
  156. Third Quarter 1997
  157. Salesperson
  158.     
  159. Autos Sold
  160. Sally
  161.     
  162. 15   
  163. Mark
  164.     
  165. 12   
  166. Jim
  167.     
  168. 18   
  169. Steve
  170.     
  171. 11   
  172. Nancy
  173.     
  174. 8
  175.    
  176. Rich
  177.     
  178. 11   
  179. Nick
  180.     
  181. 21   
  182. Dave
  183.     
  184. 6   
  185. Mary
  186.     
  187. 13   
  188. Sam
  189.     
  190. 10   
  191. Susan
  192.     
  193. 15   
  194. John
  195.     
  196. 8
  197.    
  198.  
  199.  
  200. Note:
  201.   The current TextBlock font will be used within the graph.  To change this 
  202. font, go to the Graphics/Settings/TextBlocks... menu and select 'Define'.
  203.  
  204. Selecting Data
  205. The data to be graphed must be highlighted by dragging the pointer through all 
  206. of the lines which contain data.  The highlight doesn't have to start at the 
  207. very first character, or end at the very last, it just has to overlap each line 
  208. that contains data.  Be careful not to highlight lines that contain no data, as 
  209. this will prevent the 
  210. SuperMacro
  211.  from running properly.
  212.  
  213.  
  214. Creating the Graph
  215. Once the data is highlighted, select the 
  216. CreateBarGraph
  217.  SuperMacro.  This can be done by selecting the 
  218. "Other >> ARexx Script" option from the "User" menu.  Then go to the directory 
  219. that contains the SuperMacros and double-click on 
  220. Create Bar Graph
  221. .
  222.  
  223. A requestor will ask you to enter the maximum range for the Y-axis and the 
  224. Y-axis increment.  This is the highest number that will appear on the vertical 
  225. axis, and the increments which will be plotted on that axis.  In the above 
  226. example the maximum range is 25, and the increment is 5.
  227.  
  228.  
  229. Manipulating the Graph
  230. Once the graph has been created, it can be moved, sized and rotated just like 
  231. any other object.  If you want to change just a piece of the graph, like the 
  232. subtitle, you must ungroup the graph first.  Do this by selecting the object, 
  233. then choose the "Ungroup" option from the "Graphics" menu.  Now any part of the 
  234. graph can be manipulated as an individual object.  To regroup the objects into 
  235. one, drag a box around them all, choose "Group" from the "Graphics" menu.
  236.  
  237. Create_BusinessLetter
  238. No explanation required, just follow the prompts.
  239.  
  240. Create_Letterhead
  241. No explanation required, just follow the prompts.
  242.  
  243. Create_Memorandum
  244. No explanation required, just follow the prompts.
  245.  
  246. Create_Table
  247. Just type in the data using the format:
  248.  
  249. Title
  250. <return> [Optional]
  251. Item1
  252. <tab>
  253.     
  254. Item2
  255. <tab> 
  256. Item3
  257. <tab>
  258.     
  259. and so on...
  260. Item1
  261. <tab>
  262.     
  263. Item2
  264. <tab> 
  265. Item3
  266. <tab>
  267.     
  268. and so on...
  269.  
  270. Then highlight through all of the data lines you want in the table.  Run the 
  271. Macro.
  272.  
  273. Example:
  274.  
  275. Farm Animals
  276. Animal
  277.     
  278. 1993
  279.     
  280. 1994
  281. Cows
  282.     
  283. 2
  284.     
  285. 6
  286. Pigs
  287.     
  288. 56
  289.     
  290. 12
  291. Goats
  292.     
  293. 2
  294.     
  295. 6
  296.  
  297. The above example will produce the following table:
  298.  
  299.  
  300. Farm Animals
  301.     
  302. Animal
  303.     
  304. 1993
  305.     
  306. 1994
  307.     
  308. Cows
  309.     
  310. 2
  311.     
  312. 6
  313.     
  314. Pigs
  315.     
  316. 56
  317.     
  318. 12
  319.     
  320. Goats
  321.     
  322. 2
  323.     
  324. 6
  325.  
  326. Note: The current margins must go from the Inside to the Outside margin.
  327.  
  328.  
  329. Save_Address1.1
  330. Allows the user to input an address and save it to a data file.  The default 
  331. data file is called "Address_DataFile" and a sample is provided.  This sample 
  332. should be copied into your FWDocs drawer.  The SuperMacro will ask you for nine 
  333. pieces of information for each address, then save them all alphabetically 
  334. sorted in the data file.  Along with the actual data file, a 
  335. copy
  336.  of the data file will be saved with a ".MergeFile" extension.  This is an 
  337. ASCII file conforming to the "merge" file format, in case you want to print 
  338. merge any or all of this data at a later time.
  339.  
  340. Note:  So that the .MergeFile can also be used as a print merge data file, it 
  341. must
  342.  begin with the field names, such as:
  343.  
  344. LastName,FirstName,Company,StreetAdd1,StreetAdd2,City,State,ZipCode,Phone
  345.  
  346.  
  347. Load_Address1.1
  348. Allows the user to search the data file for any number of matches to a string 
  349. of search text.  The address(es) are then inserted at the current cursor 
  350. position.
  351.  
  352. To load all of the addresses in a certain field, such as everyone in the state 
  353. of "CO", just add the commas before and after the search text string.  For 
  354. example, searching for ",CO," will produce everyone in the state of Colorado, 
  355. but not someone named "Cooper".  To load all addresses in the data file, search 
  356. for just a comma (",").
  357.  
  358. FlowCharting Macros (general info)
  359. I have created this set of SuperMacros to make Final Writer into a more 
  360. efficient flowcharting tool (I do a lot of these for work, maybe you do too).  
  361. No doubt you will find other uses for these tools, but this is how they were 
  362. intended to be used.  
  363.  
  364. After using several dedicated flowcharting programs on other platforms, I 
  365. decided that the Amiga needed this capability too, luckily Final Writer and 
  366. ARexx provide the basis for an excellent flowcharting tool.  Dare I say that 
  367. this set of macros makes for a better flowcharting package than MS-DOS programs 
  368. costing hundreds?  Yep.  They're simple, but thats what makes them so nice to 
  369. work with; hope you think so too.
  370.  
  371. These macros will automatically create a new section in you document called 
  372. "FlowChart."  This is the section where all graphic objects will appear.  
  373. You will have to switch between the "Main" section and the "Flowchart" section 
  374. to create your chart.  Macros are provided for very quick switching via 
  375. buttons, or do it the old fashioned way with the Edit/Go To Section menu.
  376.  
  377. The basic tools I have provided will take any highlighted 
  378. text and insert that text automatically into the selected FlowCartTool.  You 
  379. may use any font and size you wish (and even mix and match), just change it all 
  380. around before you highlight everything that should go into the symbol.  Note: 
  381. Styles other than normal are not supported by text blocks, which is what will 
  382. be used by all the macros (no automatic underlines, sorry, you'll need to draw 
  383. that by hand).  Remember, the symbols are rather small, so font sizes over 
  384. 12-14 points are not going to fit easily, 7-12 points generally work quite 
  385. well.
  386.  
  387. Most symbols are 1 inch wide, and consequently when you run your first macro, 
  388. the margins will be changed to four, one inch columns so that the text will fit 
  389. properly.  If a word won't fit on a line, you'll have to use a smaller font.  
  390. The FlowChartTool_Box macro will grow in height to accept any number of words, 
  391. but not in width, to keep things neat.  The other tools are of a fixed size.  I 
  392. did this in the interest of achieving a "professional" look. Obviously I think 
  393. using smaller text looks better than having a myriad of different symbol sizes, 
  394. and it makes connecting them all easier too.
  395.  
  396. After a macro create's a symbol for your flowchart, just drag it to the 
  397. appropriate place on the page 
  398. (holding the "Ctrl" key down while draging is a big help here, since it will 
  399. only let your symbol fall on 1/8 inch increments, making later connections 
  400. quite easy!)
  401. .
  402.  
  403. Connect the symbols by drawing lines between them.  Pressing and holding  the 
  404. "Alt" key down prior to dragging out your line will place an arrow on the end 
  405. of it.  Again, holding the "Ctrl" key down as well will snap the mouse to 1/8 
  406. inch increments.  Use any line weight you wish, all symbols will automatically 
  407. have a border of 2 points.
  408.  
  409. Hints:
  410. Jumping Lines.
  411.   Since I developed these macros on Final Writer Release 1, there are no 
  412. independent, curved lines available.  Therefore, when a line needs to cross or 
  413. "jump" over another line, I suggest you simply end one line short of the other, 
  414. then start it again on the other side (or use a small white box layered in 
  415. between the lines to achieve the same affect).
  416.  
  417. Example:
  418.     
  419.     
  420.     
  421.  
  422.  
  423.  
  424. Alignment. 
  425.  Unfortunately, it seems that 
  426. grouped
  427.  objects become 
  428. very slightly
  429.  
  430. dislocated from the 1/8 inch grid, provided by the "Ctrl" key.  This can make 
  431. precisely attaching arrows a little bit difficult.  If your not satisfied with 
  432. the match up, try dragging out a box over the whole page to select all 
  433. graphics, lock them in place, go back and select only the symbols while holding 
  434. down the shiftkey (multiple select)
  435.  to select 
  436. everything but the arrows and lines, then select the Graphics/Bring To Front 
  437. menu item.  You may even want to make the lines overlap well underneath your 
  438. symbols when using this technique.
  439.  
  440. Tool Bar Setup.  
  441. These macros lend themselves to a dedicated button strip, thats how they were 
  442. designed.  Try a design similar to 
  443. button strip three
  444.  associated with this document for a really nice setup.  The end buttons toggle 
  445. you between the main section and the flowchart section, with the useful tools 
  446. in the middle (the next six on the left being these macros).
  447.  
  448. FlowChartTool_Box
  449. Normally use this tool for each step in any process.  This tool is the only one 
  450. that will expand (in height only) to accept an unlimited amount of text.  It 
  451. will be 1 inch wide and variable in length.  
  452.  
  453.  
  454.  
  455.  
  456. FlowChartTool_Circle
  457. Normally use this tool to annotate conections to other charts.  It will 
  458. always
  459.  be 3/4 inch in diameter.
  460.  
  461.  
  462.  
  463.  
  464. FlowChartTool_Diamond
  465. Normally use this tool to annotate decision points within charts, branch titles 
  466. like "yes" and "no" can be generated with standard text blocks, or the 
  467. FlowChartTool_Text if you want.  It will 
  468. always
  469.  be 1 an inch wide and 1 inch long at its widest points.
  470.     
  471.  
  472.  
  473.     
  474.  
  475. FlowChartTool_Elipse
  476. Normally use this tool to annotate start and end points within charts.  It will 
  477. always be 1 inch wide and 1/2 inch long.
  478.  
  479.  
  480.  
  481. FlowChartTool_Graphic
  482. This tool will take the highted text and lay it on top of any graphic.  It will 
  483. present the Open Graphic requestor so you can pick any graphic you like.  The 
  484. objects that appear on the flowchart are 
  485. not
  486.  grouped automatically like the other tools.  This is so that you may size and 
  487. align everthing just the way you want.  I suggest you group it all when you are 
  488. finished so that moving it in the future will be easy.  The sample is a 
  489. hi-resolution full screen image, scaled within Final Writer, with a 2 point 
  490. border, a white box under the text, and a black box offset for a shadow--all 
  491. grouped.
  492.  
  493. FlowChartTool_Text
  494. This tool can be used to generate 1 inch wide text blocks of any length.  
  495. Useful if you want to put a note on the page.
  496.  
  497.  
  498.  
  499.  
  500. FlowChart_ToMain
  501. This macro makes for a nice button to quickly switch back to the "Main" section 
  502. of your document, which is where all of the raw text is kept.  The text entry 
  503. mode will automatically be selected for you.
  504.  
  505. FlowChart_ToFlowChart
  506. This macro makes for a nice button to quickly switch back to the "Flowchart" 
  507. section of your document, which is where the flowchart itself is kept.  The 
  508. graphic manipulation mode (the arrow button) will automatically be selected for 
  509. you.
  510.  
  511.  
  512.  
  513. SuperMacros
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543. 8
  544.  ~
  545.  
  546.